package cn.edu.jmu.oelp.service.impl;

import cn.edu.jmu.oelp.mapper.ArticleMapper;
import cn.edu.jmu.oelp.pojo.Article;
import cn.edu.jmu.oelp.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author huanghongbe
 */

@Service
public class ArticleServiceImpl implements ArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    @Override
    public boolean addArticle(Article article) {
        return articleMapper.addArticle(article);
    }

    @Override
    public boolean delArticle(int articleId) {
        return articleMapper.delArticle(articleId);
    }

    @Override
    public boolean updateArticle(Article article) {
        return articleMapper.updateArticle(article);
    }

    @Override
    public Article selArticleById(int articleId) {
        return articleMapper.selArticleById(articleId);
    }
}
